<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
	<head>
		<!--加载header文件-->
		<?php
		include_once 'public/views/header.php';
		include_once 'public/home/html/alert.php';
		include_once 'public/home/html/laydate.php';
		?>
		<?php 
		include_once 'public/home/html/select.php';
		?>
		<link rel="stylesheet" href="public/css/list.css" />
		<link rel="stylesheet" href="public/xr/xrDatatable.css" />
		<script src="public/xr/xrDatatable.js"></script>
		<script src="public/js/list.js"></script>
		<script src="public/home/js/function.js"></script>
		<script src="cust/js/feedbackList.js?v=20201123"></script>
		
		<style>
			.tab-item{
				float: left;
				height:40px;
				width:120px;
				line-height: 40px;
				text-align: center;
				/*border-bottom:1px solid #CCCCCC;*/
				font-size: 14px;
				font-weight: bold;
				cursor: pointer;
				
				
			}
			.tab-item-check{
				
				border-left:1px solid #CCCCCC;
				border-right:none;
				border-top:5px solid #0F7CE0;
				color:#0F7CE0!important;
				/*background-color: #fff!important;*/
				box-shadow: -5px -5px 5px #999; 
				border-bottom:none!important;
				line-height: 35px!important;
				/*margin-bottom: 1px;*/
				background-color: #ccc!important;
			}
			.demo-content{
				height:250px;
				padding-top:10px;
				padding-bottom: 10px;
			}
			.demo-item{
				width:40%; height:230px; float: left;
			}
			.result,.result:focus{
				height:130px;
				width:100%;
				border:none;
				resize: none;
				background-color: #eee;
				outline:none;
			}
			.result-text{
				height:130px;
			}
			.result-button{
				height:50px;
				line-height: 50px;
				text-align: right;
				padding-right:10px;
			}
			.result-title,.content-title,.img-title{
				height:50px;
				font-weight: bold;
				color:#555;
				font-size: 14px;
				text-align: left;
				line-height: 50px;
			}
			.content-text{
				height:180px;
			}
			.content{
				height:175px;
				border:none;
				resize: none;
				outline:none;
				width:100%;
			}
			.content::-webkit-scrollbar,.result::-webkit-scrollbar {display:none}

			.demo-img{
				height:200px;
				line-height: 150px;
				padding:0px 10px;
			}
			.demo-img img{
				width:90%;
				height:auto;
				/*margin-left: 5%;*/
				cursor: pointer;
			}
			#checkbox{
				display: inline-block;
				margin-top: -4px;
			　　vertical-align: middle;
			}
		</style>
	</head>
	<body>
		<input type="hidden" id="role" value="<?php echo $role ?>">
		<input type="hidden" id="feedback_type" value="<?php echo $feedback_type ?>">
		<div class="page-container container">
			<div class="searchForm">
			    <div class="searchForm-title"><i class="icon-table searchForm-title-icon"></i>数据表格<i class="icon-double-angle-up searchFormTitleIcon"></i></div>
			    <div class="searchForm-main">
					<form id="searchForm">
							<input style="width:200px;" type="text" name='param' id="param" placeholder="提交人/分院/班级"/>
							<?php if ($status): ?>
							<select name="status" id="status">
								<option value="0">全部</option>
								<?php foreach ((new FeedBackStatus)->getAll() as $k => $v): ?>
								<option value="<?php echo $v[XPHEnum::Value] ?>"  <?php if($k==0)echo "selected" ?> ><?php echo $v[XPHEnum::Caption] ?></option><?php endforeach ?>
							</select>	
							<?php endif ?>
							<?php if ($show): ?>
							&nbsp;校领导可见：<select name="show" id="show">
								<option value="-1">全部</option>
								<?php foreach ((new CommonWhether)->getAll() as $k => $v): ?>
								<option value="<?php echo $v[XPHEnum::Value] ?>"><?php echo $v[XPHEnum::Caption] ?></option><?php endforeach ?>
							</select>
							<?php endif; ?>

				<input type="text" style="width: 150px;" name="start_time" dataType="*" id="start_time" value="" placeholder="反馈开始时间" /> 至
					<input type="text" style="width: 150px;" name="end_time" dataType="*" id="end_time" value="" placeholder="反馈结束时间" />
					<input type="checkbox" name="checkbox[]" id="checkbox" value="0" style="vertical-align: middle;width:50px;">已转发
					</form>
				</div>
			</div>
			<div class="operationRow">
				<span>共计<span id="count" style="color: red;">0</span>条反馈信息</span>
			</div>
			<div class="operationRow tab-div" style="border:none; padding:10px 0px;">
				<?php foreach ((new FeedbackType)->getAll() as $k => $v): ?>
				<div class="tab-item <?php if($k==0) echo 'tab-item-check' ?>" data-feedback_type="<?php echo $v[XPHEnum::Value] ?>"><?php echo $v[XPHEnum::Caption] ?></div>
				<?php endforeach ?>
			</div>
			<div class="listcontent">
				<div class='xrTableRow'>
					<table id="table" class="xrTable">
						<thead>
							<tr>
								<th name="_xrno"></th>
								<th name="_oper" style="width: 170px;">操作</th>
								<<?php if (!isset($a)):?> 
								<th name="_creator_char" > 提交人</th>
								 <?php endif;?>
								<th name="_belong_char" > 转发目标用户 </th>
								<th name="_type_char" > 反馈类型 </th>
								<th name="_category" > 反馈类别 </th>
								<th name="_status_char" > 反馈状态 </th>
								<th name="_dept_name" > 分院 </th>
								<th name="_class_name" > 班级 </th>
								<th name="_created_char" > 反馈时间 </th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
		<div class="sub-demo hide">
			<div class="demo-content">
				<div class="demo-item" style="margin-right: 2%; width:16%;">
					<div class="col-xs-12 img-title">
						图片查看
					</div>
					<div class="col-xs-12 demo-img">
						<img src="<?php echo base_url() ?>public/home/images/img-document.jpg" alt="" class="show-img">
					</div>
				</div>
				<div class="demo-item" style="margin-right: 2%; border:1px solid #ccc!important;">
					<div class="col-xs-12 content-title">
						反馈意见
					</div>
					<div class="col-xs-12 content-text">
						<textarea class="content" readonly="readonly"></textarea>
					</div>
				</div>
				<div class="demo-item" style="background-color: #eee;">
					<div class="col-xs-12 result-title">
						处理意见和结果
					</div>
					<div class="col-xs-12 result-text">
						<textarea class="result"></textarea>
					</div>
					<div class="col-xs-12 result-button">
						<div class="btn btn-xs btn-success save-result">保存</div>
					</div>
				</div>	
			</div>
		</div>
	</body>
	<script>
		$("body").keydown(function() {
             if (event.keyCode == "13") {//keyCode=13是回车键
                 $('.searchButton').click();             
             }
         });
		$("#status").change(function(){
			$('.searchButton').click();
		});
		$("#show").change(function(){
			$('.searchButton').click();
		});

		$("#start_time").change(function(event) {
			console.log(123);
			$('.searchButton').click();
		});

		$("#end_time").change(function(event){
			console.log(456);

			$('.searchButton').click();
		});

		$("#checkbox").change(function(event) {
			console.log(123);
			$('.searchButton').click();
		});
		
		
	</script>
</html>